<template>
  <div class="bg">
    <iframe id="child" :src="iframeSrc" style="width: 100%; height: 300%"></iframe>
  </div>
</template>

<script>
export default {
  data() {
    return {
      iframeSrc: 'http://36.26.7.134:38080/photovoltaic-manager/index/portal.htm',
    }
  },
  mounted() {
    // 动态设置 cookie
    document.cookie = 'mycookie=myvalue; path=/; domain=example.com; Secure; SameSite=None'
  },
  methods: {
    onIframeLoad() {
      console.log('iframe loaded')
    },
  },
}
</script>

<style lang="scss" scoped>
.bg {
  display: flex;
  height: 1200px;
}
</style>
